Genericity in Java with Virtual Types
نویسنده
چکیده
This paper suggests virtual types for Java, a language mechanism which subsumes parameterized classes, while also integrating more naturally with Java’s object model. The same basic mechanism is also known as virtual patterns in Beta and as generics in Ada95. We discuss various issues in the Java type system, issues with inheritance and genericity in general, and give a specific suggestion as to how virtual types should be integrated into Java. Finally we describe how to make an efficient implementation of virtual types based only upon the existing Java virtual machine.
منابع مشابه
Targeting the Java Virtual Machine with Genericity, Multiple Inheritance, Assertions and Expanded Types
متن کامل
A Statically Safe Alternative to Virtual Types
Parametric types and virtual types have recently been proposed as extensions to Java to support genericity. In this paper we investigate the strengths and weaknesses of each. We suggest a variant of virtual types which has similar expressiveness, but supports safe static type checking. This results in a language in which both parametric types and virtual types are well-integrated, and which is ...
متن کاملGenericity in Object-Oriented Programming Languages
Genericity is one of the most powerful means for obtaining flexibility in programming with statically typed programming languages. Genericity constructs take on very different forms, the choice of which has a considerable impact on expressiveness, modularity, static checkability and efficiency properties of programs. This tutorial presents an in-depth discussion of the history, origins, and str...
متن کاملGenja - A New Proposal for Parameterised Types in Java
Recent proposals for adding parameterised types to Java have left a number of important practical issues undiscussed. In this paper we present the language Genja which is a new generic extension of Java oriented towards practical support for generic collection types. We discuss design alternatives related to extending the power of unconstrained genericity, solving the weaknesses of constrained ...
متن کاملPoor Man's Genericity for Java
A number of proposals have been made as to how Java can be changed to support parameterized types. We present a new proposal that does not try to provide more powerful constructs or cleaner semantics, but instead minimizes the changes that need to be made to existing Java compilers. In particular, we found that changing only one method in Sun's Java compiler already results in a reasonable impl...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
عنوان ژورنال:
دوره شماره
صفحات -
تاریخ انتشار 1997